﻿using System;
using System.Collections.Generic;

namespace FinMkts
{
    /// <summary>
    /// The listing of a instrument in a market place
    /// </summary>
    /// <example>
    /// Vodafone (instrument) is listed on the London Stock Exchange (market place) as VOD.L (listing code)
    /// </example>
    public class MarketListing
    {
        public virtual Guid MarketPlaceId { get; set; }

        public virtual Guid InstrumentId { get; set; }

        /// <summary>
        /// The instrument being listed
        /// </summary>
        public virtual FinancialInstrument Instrument { get; set; }

        /// <summary>
        /// The code this instrument is known by, e.g. VOD.L
        /// </summary>
        public virtual string ListingCode { get; set; }

        //TODO: does this also have a name?

        /// <summary>
        /// The place where this instrument is traded
        /// </summary>
        public virtual MarketPlace MarketPlace { get; set; }

        ///// <summary>
        ///// The times this instrument is traded in this market place, which might be the market place trading times
        ///// </summary>
        //public TradingTimes TradingTimes { get; set; }

        ///// <summary>
        ///// The fees payable to buy or sell an instrument
        ///// </summary>
        //public IEnumerable<TradingFee> Fees { get; set; }

        ///// <summary>
        ///// Allows getting the price of this market
        ///// </summary>
        //public IEnumerable<IMarketDataListing> GetMarketData()
        //{
        //    throw new NotImplementedException();
        //}

        public virtual ICollection<MarketDataListing> MarketDataListings { get; set; }
    }
}